<?php

defined('BY_JYA') or exit('error');
list($card_id, $num, $type)=$arguments;
		$jsonData = '{';
		$jsonData .= '"card_id":"' . $card_id . '"';

		if (empty($type)) {
			$jsonData .= ',"increase_stock_value":' . $num;
		}
		else {
			$jsonData .= ',"reduce_stock_value":' . $num;
		}

		$jsonData .= '}';
		
		$url = 'https://api.weixin.qq.com/card/modifystock?access_token=' . $token;
		
		$token =  cfc('account')->getAccessToken();
		
		
		$result = cfc('http')->ihttp_post($url,$jsonData);
		$result =@json_decode($result['content'],true);
		return $result;
